package com.hong.concurrent.chapter18;

/**
 * @Author csh
 * @Description
 * @Date 2018/7/12 21:22
 * {@link ActiveObject#makeString(int, char)}
 */
public class MakeStringRequest extends MethodRequest {

    private final  int count;
    private final char fillchar;

    public MakeStringRequest(Servant servant, FutureResult futureResult,int count,char fillchar) {
        super(servant, futureResult);
        this.fillchar=fillchar;
        this.count = count;
    }

    @Override
    public void execute() {
        Result result = servant.makeString(count,fillchar);
        futureResult.setResult(result);
    }
}
